﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Sales
{
    [NHibernateEntity(Table = "Leads")]
    public class Lead : ITrackable
    {
        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string FirstName { get; set; }

        [Property]
        public virtual string LastName { get; set; }

        [Property]
        public virtual string Email { get; set; }

        [Property]
        public virtual string Phone { get; set; }

        [Property]
        public virtual string MobilePhone { get; set; }

        [BelongsTo(Column = "ID_Address")]
        public virtual Address Address { get; set; }

        [Property]
        public virtual string AdditionalInfo { get; set; }

        [Property]
        public virtual LeadState State { get; set; }

        [BelongsTo(Column = "ID_Activity")]
        public virtual Activity Activity { get; set; }



        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }

    public enum LeadState { 
        New = 0,
        Prospect = 1,
        ProspectFailed = 2,
    }
}
